Copy a Crystal Reports Template to Create a Crystal Report with an OLE DB (ADO) Connection
Note: This activity describes using Visual Studio 2005 with the Crystal Reports application; or using the Crystal Reports application. Activity steps may vary with later versions of these applications. This activity does not explain the installation, configuration or in-depth information for Microsoft Visual Studio, Crystal Reports or Microsoft SQL Server. See your network administrator for installation and configuration information.
Activity Steps
- Perform one of the following steps:
- To use Microsoft Visual Studio with the Crystal Reports application:
- Either double-click the Microsoft Visual Studio icon on the desktop, or select Start » All Programs » Microsoft Visual Studio 2005 » Microsoft Visual Studio 2005.
The Visual Studio .NET 2005 application opens.
- Select File » Open File from the main menu.
A new Windows Application project opens.
- Select the Visual C# » Window project type from the project types list.
- Select Crystal Reports Application from the templates list.
- Enter the Name.
- Enter the Location.
- Check Create directory for solution.
- Click OK.
This step creates a Crystal Report project and opens the Visual Studio 2005 Form Design Screen, displaying the Crystal Reports Gallery form.
- Select As a Blank Report from the Crystal Reports Gallery form.
- Click OK.
- Either double-click the Microsoft Visual Studio icon on the desktop, or select Start » All Programs » Microsoft Visual Studio 2005 » Microsoft Visual Studio 2005.
- To use the Crystal Report application:
- If the Welcome to Crystal Reports form is opened, select the option to Open an Existing Report, select More Files, and click OK.
- If the Welcome to Crystal Reports form is not opened, select File » Open from the menu.
- To use Microsoft Visual Studio with the Crystal Reports application:
- Navigate to the folder defined by the ReportTemplatePath setting under the Reports group in the MineMarket Service Config program.
- Locate and select the Crystal Report template to copy.
- Click Open.
The template opens in the Crystal Report application.
- If any links could not be updated:
- Click Links.
- Select the broken link.
- Click Change Source.
- Locate and select the correct file.
- Select File » Save As from the menu.
- Enter the name of the new report template.
- Select Database » Database Expert from the menu.
The Database Expert form opens.
- Expand the Create New Connection node.
- Expand the OLE DB (ADO) node.
The OLE DB (ADO) form opens.
- Select the Provider to be SQL Native Client.
- Click Next.
- Enter the name of the Data Source from where the data for the report is to come.
- Enter a valid User ID for the database server.
- Enter the Password for the user.
- Enter the name of the Database.
- Uncheck Integrated Security.
- Click Finish.
The server displays as a node under the OLE DB (ADO) node, and the database displays as a node under the server node in the Data tab.
- Expand the node for the database.
- Expand the dbo node.
- Expand the Tables node.
All MineMarket database tables display under the Tables node.
- Locate and select the table.
- Click > to move it to the Selected Tables group.
- Add other tables as required for the report.
- Click OK.
- Select the Links tab.
- Expand the form if not all tables display, and ensure that no tables are hiding behind other tables.
- Enter the links to relate the tables to each other.
- Click Auto-Arrange to rearrange the tables and links in a logical order.
- Click OK.
This step closes the Database Expert form and returns control to the Report Template form.
- Rebuild the report to display the desired information.
- Select File » Save from the menu.
- Exit the Crystal Report application.
- If using the Microsoft Visual Studio application, exit it.